#include "connection.h"

#include <QtCore/QCoreApplication>

#include <QRemoteSignal>
#include <QDebug>

Connection::Connection (QTcpSocket *socket, QObject *parent):QObject(parent) {
   socket->setParent(this);
   connect(socket,SIGNAL(disconnected()),
           this,SLOT(deleteLater()));

   qrs::ServicesManager *manager = new qrs::ServicesManager(this);
   mService = new qrs::TvService(manager);
   manager->addDevice(socket);
}

qrs::TvService *Connection::service() const
{
    return mService;
}
